﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HubPageDivided.Master" Inherits="Deixei.Web.DeixeiViewPage<dynamic>" %>
<%@ Import Namespace="Deixei.Web" %>
<asp:Content ID="Content2" ContentPlaceHolderID="DocumentBegin" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="PageBegin" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="MainContentBegin" runat="server">
</asp:Content>

<asp:Content ID="Content6" ContentPlaceHolderID="HubBegin" runat="server">
</asp:Content>

<asp:Content ID="Content7" ContentPlaceHolderID="HubTitle" runat="server">
</asp:Content>

<asp:Content ID="Content8" ContentPlaceHolderID="HubTitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="RightHubContent" runat="server">
<h2>Application Portfolio Management</h2>
    <% Html.EnableClientValidation(); %> 
    <form data-bind="with: Item" id="MyForm">
        <legend>New Navigation Area</legend>
        
        <%: Html.ValidationSummary() %>
        <%: Html.Entity<NavigationArea>().koTextBoxFor(r => r.GroupName ) %>
        <%: Html.Entity<NavigationArea>().koTextBoxFor(r => r.Area ) %>
        <%: Html.Entity<NavigationArea>().koTextBoxFor(r => r.Description) %>
        <%: Html.Entity<NavigationArea>().koTextBoxFor(r => r.Url ) %>
       
        <%: Html.Button("Add ", "$root.AddNavigationArea", Html.Icon(Icon.Plus)) %>
        <%: Html.Button("Save ", "$root.SaveNavigationArea", Html.Icon(Icon.Ok)) %>
    </form>

</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="LeftHubContent" runat="server">
<h2>Application Portfolio Management</h2>
    <select data-bind="options: $root.WebAppList, optionsText: 'Name', optionsCaption: 'Select...', value: $root.WebAppListValue"> </select>

    <%: Html.Button("Refresh ", "GetNavigationAreasByPage", Icon.Refresh) %>
    <%: Html.DialogBoxButton("AddWebApplicationDialogBox", "Add Application", Icon.PlusSign) %>
    <table class="table table-striped table-hover table-condensed">
        <thead>
            <tr>
                <th>#</th>
                <th>Id</th>
                <th>Group Name</th>
                <th>Area Name</th>
                <th>Description</th>
                <th>Url</th>
            </tr>
        </thead>
        <tbody data-bind="foreach: List">
        <tr>
            <td><%: Html.ButtonGroup( Html.Button("", "$root.EditNavigationArea", Icon.Pencil, buttonSize: ButtonSize.Mini), Html.Button("", "$root.DeleteNavigationArea", Icon.Remove, buttonSize: ButtonSize.Mini) ) %></td>
            <td data-bind="text: Id"></td>
            <td data-bind="text: GroupName"></td>
            <td data-bind="text: Area"></td>
            <td data-bind="text: Description"></td>
            <td data-bind="text: Url"></td>
        </tr>
            </tbody>
        <tfoot>
            <tr>
                <td colspan="6">
                    <%: Html.ButtonToolbar(Html.ButtonGroup(
                    Html.ButtonIcon(Icon.FastBackward, "clickPagerFastBackward"),
                    Html.ButtonIcon(Icon.Backward, "clickPagerBackward"),
                    Html.ButtonIcon(Icon.Forward, "clickPagerForward"),
                    Html.ButtonIcon(Icon.FastForward, "clickPagerFastForward")
                    )) %>

                </td>
            </tr>
        </tfoot>
    </table>
</asp:Content>

<asp:Content ID="Content10" ContentPlaceHolderID="HubEnd" runat="server">
</asp:Content>

<asp:Content ID="Content11" ContentPlaceHolderID="MainContentEnd" runat="server">
</asp:Content>

<asp:Content ID="Content12" ContentPlaceHolderID="PageEnd" runat="server">
    <%: Html.DialogBox("AddWebApplicationDialogBox", "Add Web Application", Html.Partial("AddWebApplicationDialogBox")) %>

</asp:Content>

<asp:Content ID="Content13" ContentPlaceHolderID="ScriptsSection" runat="server">
    <script src="/Admin/Portfolio/PortfolioIndexScript"></script>
    <script src="/Scripts/App/Admin/PortfolioIndexViewModel.js"></script>    
</asp:Content>
